package user;

import Book.Book;
import Book.BookList;
import operation.IOPeration;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-11-01
 * Time: 20:10
 */
public abstract class User {
    public String name;
    public IOPeration[] ioPerations;//没有初始化
    public User(String name){
        this.name=name;
    }
    public abstract int menu();

    public void doOperations(int choice, BookList books){
        //return this.ioPerations[choice];
        IOPeration ioPeration = this.ioPerations[choice];
        //IOPeration ioPeration = new FindBook();
        ioPeration.work(books);
    }
}
